#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main()
{
	string s1;
	int b;
	cin>>s1>>b;
	int len=s1.size();
	int arr1[100]={0};
	for(int i=0;i<len;i++){
		arr1[i]=s1[len-i-1]-'0';
	}
	int arr2[10000]={0};
    for(int i=0;i<len;i++){
    	arr2[i]=arr1[i]*b;
	}
	int i=0;
	while(arr2[len-1]>0){
		if(arr2[i]>=10){
			arr2[i+1]+=arr2[i]/10;
			arr2[i]%=10;
		}
		i++;
		if(i>=len)  len=i+1;
	}
    for(int i=len-2;i>=0;i--){
    	cout<<arr2[i];
	}
	return 0;
 } 
